﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QuestionSetLibrary;
using System.Web;

namespace FormsControlLibraryForWindowsAndWeb
{
    public partial class UserControlForClient : UserControl
    {
        public UserControlForClient()
        {
            InitializeComponent();
        }

        private void buttonSignOut_Click(object sender, EventArgs e)
        {
            this.Visible = false;
        }

        private void UserControlForClient_Load(object sender, EventArgs e)
        {
            label_Client_Name.Text = UserControlForLogin.userId.ToString();
            string json = GetHTTP.GetWebContent("http://localhost:50037/GetQuestionSet/all");
            QuestionSet[] setList = JsonCovertor.GetQuestionSetFormJSON(json);
            List<string> questionSetNameList = new List<string>();
            for (int i = 0; i < setList.Length; i++)
            {
                questionSetNameList.Add(setList[i].setName); 
            }
        }

        
    }
}
